package com.fy.springmvc2.controller;

import com.fy.springmvc2.entity.FastUser;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
@RequestMapping("/fast")
public class FastController {
    @RequestMapping("t1")
    public FastUser t1(){
        FastUser fastUser = new FastUser();
        fastUser.setId(1);
        fastUser.setUsername(null);
        fastUser.setBirthday(new Date());
        fastUser.setSalary(900.546);
        fastUser.setPassword("hhh123");
        fastUser.setMarryDay(new Date());
        // 主动抛一个异常 为了验证全局的异常解析器
       // int a = 1/0;
        return fastUser;
    }
}
